package jsyf.oa.entity.apply;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author: 徐波
 * @creat: 2017/11/30 0030 19:16
 * description:
 */
@Entity
@Table(name = "T_APL_MONEY_AUDIT", schema = "oa", catalog = "")
public class MoneyAuditEntity extends BaseEntity {
    private String fkMoneyId;
    private String auditorId;
    private String auditorName;
    /**
     * 审核状态:
     * <p>
     * -1:未提交/草稿<br/>
     * 0: 用款申请已提交/用款申请审核中<br/>
     * 1: 用款申请审核通过<br/>
     * 2: 用款申请审核驳回<br/>
     * 3: 付款申请已提交/付款申请审核中<br/>
     * 4: 付款申请审核通过/待付款/未付款<br/>
     * 5: 付款申请审核驳回<br/>
     * 6: 已付款<br/>
     * <p>
     */
    private String auditFlag;
    private Integer auditSort;
    private Date auditTime;
    private String auditAdvise;

    @Basic
    @Column(name = "FK_MONEY_ID")
    public String getFkMoneyId() {
        return fkMoneyId;
    }

    public void setFkMoneyId(String fkMoneyId) {
        this.fkMoneyId = fkMoneyId;
    }

    public String getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(String auditorId) {
        this.auditorId = auditorId;
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    @Basic
    @Column(name = "AUDIT_FLAG")
    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    @Basic
    @Column(name = "AUDIT_SORT")
    public Integer getAuditSort() {
        return auditSort;
    }

    public void setAuditSort(Integer auditSort) {
        this.auditSort = auditSort;
    }

    @Basic
    @Column(name = "AUDIT_TIME")
    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    @Basic
    @Column(name = "AUDIT_ADVISE")
    public String getAuditAdvise() {
        return auditAdvise;
    }

    public void setAuditAdvise(String auditAdvise) {
        this.auditAdvise = auditAdvise;
    }


    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", id);
        obj.put("FK_MONEY_ID", fkMoneyId);
        obj.put("AUDITOR_ID", auditorId);
        obj.put("AUDITOR_NAME", auditorName);
        obj.put("AUDIT_FLAG", auditFlag);
        obj.put("AUDIT_SORT", auditSort);
        obj.put("AUDIT_TIME", auditTime);
        obj.put("AUDIT_ADVISE", auditAdvise);
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_APL_MONEY_AUDIT";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("FK_MONEY_ID", "fkMoneyId");
        obj.put("AUDITOR_ID", "auditorId");
        obj.put("AUDITOR_NAME", "auditorName");
        obj.put("AUDIT_FLAG", "auditFlag");
        obj.put("AUDIT_SORT", "auditSort");
        obj.put("AUDIT_TIME", "auditTime");
        obj.put("AUDIT_ADVISE", "auditAdvise");
        return obj;
    }

}
